using ASP;
using HoWave.Common;
using HoWave.Web.Admin;
using System;
using System.Collections;
using System.Web;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class HL_Admin_RemoveCache : Admin, IRequiresSessionState
{
	protected Literal OKMsg;
	protected Literal ErrMsg;
	protected HtmlForm form1;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		this.RemoveCache();
	}
	protected void RemoveCache()
	{
		foreach (string key in new ArrayList
		{
			"siteconfig",
			"shopconfig",
			this.AppPrefix + "HoWaveSiteConfig",
			this.AppPrefix + "HoWaveConnectionStrings",
			this.AppPrefix + "LanguageDoc",
			"isright"
		})
		{
			if (HttpContext.Current.Cache[key] != null)
			{
				HttpContext.Current.Cache[key] = null;
				HttpContext.Current.Cache.Remove(key);
			}
		}
		string text = "~/Label/LabelOutPut";
		text = HttpContext.Current.Server.MapPath(text);
		FileIO fileIO = new FileIO();
		if (!fileIO.DeleteFileFolder(text))
		{
			this.OKMsg.Visible = false;
			this.ErrMsg.Visible = true;
		}
	}
}
